package com.seckill.commons;

/**
 * JSON统一返回值封装对象，用于封装响应的Json格式数据
 * @param <T>
 */
public class ReturnObject <T>{
    //响应状态码 例如0为请求成功 1为请求失败
    private int code;
    //响应信息 例如 请求成功
    private String msg;
    //响应的具体数据
    private T result;

    public ReturnObject() {
    }

    public ReturnObject(int code, String msg, T result) {
        this.code = code;
        this.msg = msg;
        this.result = result;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }
}
